package com.sjft.cloud.commons.support.datamodel.core.rule;


import com.sjft.cloud.commons.support.datamodel.enums.ModelFieldTypeEnum;
import com.sjft.cloud.commons.support.datamodel.core.ModelFieldRule;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * CheckboxType
 *
 * @author Jin
 */
@Getter
@Setter
public class CheckboxRule implements ModelFieldRule {

    private String name = ModelFieldTypeEnum.CHECKBOX_NAME;

    private Boolean require = false;

    private String message = "请选择！";

    private Integer wordLimit = 20;

    private List<Map<String, Object>> element = new ArrayList<>();

    public CheckboxRule() {
        Map<String, Object> demo = new HashMap<>();
        demo.put("label", "label");
        demo.put("value", "value");
        element.add(demo);
    }

}
